import { defineUserConfig } from "vuepress";
import { searchProPlugin } from "vuepress-plugin-search-pro";
import { componentsPlugin } from "vuepress-plugin-components";
import theme from "./theme.js";

export default defineUserConfig({
  base: "/zpush_doc/",
  lang: "zh-CN",
  title: "知了Push",
  description: "知了Push是一款应用到应用之间的通信软件。",
  theme,
  plugins: [
    searchProPlugin({
      // 索引全部内容
      indexContent: true,
      locales: {
        "/": {
          // 覆盖 placeholder
          placeholder: "搜索",
        },
      },
    }),
    componentsPlugin({
      rootComponents: {
        backToTop: true,
        notice: [
          {
            path: "/",
            title: "公告 Title",
            content: "公告 Content",
            actions: [
              {
                text: "点击调转",
                link: "https://theme-hope.vuejs.press/",
                type: "primary",
              },
              { text: "关闭" },
            ],
          },
        ]
      }
    })
  ],
  shouldPrefetch: false,
});
